<template>
  <div>
    <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
    >
      <!-- <el-menu-item
        index="Home"
        @click="$router.replace('/home').catch((err) => {})"
        >主页</el-menu-item
      > -->
      <el-menu-item
        index="Market"
        @click="$router.replace('/market').catch((err) => {})"
        >交易</el-menu-item
      >
    </el-menu>
  </div>
</template>

<script>
export default {
  name: "HeaderNav",
  model: {
    prop: "activeIndex",
    event: "select",
  },
  props: {
    activeIndex: String,
  },
  data() {
    return {};
  },
  methods: {
    handleSelect(key) {
      this.$emit("select", key);
    },
  },
};
</script>

<style></style>
